<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use App\Models\Users;
class UsersFactory extends Factory
{
    /**
     * 工厂对应模型名
     *
     * @var string
     */
    protected $model = Users::class;


    /**
     * Define the model's default state.
     *
     * @return array
     */

    public function definition()
    {
        return [
            'username' => $this->faker->username,
            'password' => bcrypt('admin888'),
            'name' => $this->faker->name(),
            'sex' => rand(0,1),
            'type' => 0,
            'email' => $this->faker->unique()->safeEmail,
            'phone' => $this->faker->unique()->phoneNumber(),
        ];
    }
}
